﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace CollabApp.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class FixRoomPlayerUniqueConstraint : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "users",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    username = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    password_hash = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
                    password_salt = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
                    nickname = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    avatar_url = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
                    privacy_settings = table.Column<string>(type: "json", nullable: true),
                    last_login_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    status = table.Column<int>(type: "integer", nullable: false),
                    access_token = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
                    refresh_token = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
                    access_token_expires_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    refresh_token_expires_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    remember_me = table.Column<bool>(type: "boolean", nullable: false),
                    token_status = table.Column<int>(type: "integer", nullable: false),
                    last_activity_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    device_info = table.Column<string>(type: "json", nullable: true),
                    token_revoked_reason = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
                    token_revoked_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_users", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "notifications",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    notification_type = table.Column<int>(type: "integer", nullable: false),
                    title = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
                    content = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: false),
                    is_read = table.Column<bool>(type: "boolean", nullable: false),
                    data = table.Column<string>(type: "json", nullable: true),
                    read_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_notifications", x => x.Id);
                    table.ForeignKey(
                        name: "FK_notifications_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "ranking_histories",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    ranking_type = table.Column<int>(type: "integer", nullable: false),
                    rank = table.Column<int>(type: "integer", nullable: false),
                    score = table.Column<int>(type: "integer", nullable: false),
                    recorded_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ranking_histories", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ranking_histories_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "rankings",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    ranking_type = table.Column<int>(type: "integer", nullable: false),
                    current_rank = table.Column<int>(type: "integer", nullable: false),
                    score = table.Column<int>(type: "integer", nullable: false),
                    period_start = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    period_end = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_rankings", x => x.Id);
                    table.ForeignKey(
                        name: "FK_rankings_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "rooms",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
                    owner_id = table.Column<Guid>(type: "uuid", nullable: false),
                    max_players = table.Column<int>(type: "integer", nullable: false),
                    current_players = table.Column<int>(type: "integer", nullable: false),
                    password = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
                    is_private = table.Column<bool>(type: "boolean", nullable: false),
                    status = table.Column<int>(type: "integer", nullable: false),
                    settings = table.Column<string>(type: "json", nullable: true),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_rooms", x => x.Id);
                    table.ForeignKey(
                        name: "FK_rooms_users_owner_id",
                        column: x => x.owner_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "user_statistics",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    total_games = table.Column<int>(type: "integer", nullable: false),
                    wins = table.Column<int>(type: "integer", nullable: false),
                    losses = table.Column<int>(type: "integer", nullable: false),
                    win_rate = table.Column<decimal>(type: "numeric(5,2)", precision: 5, scale: 2, nullable: false),
                    total_score = table.Column<int>(type: "integer", nullable: false),
                    max_area = table.Column<decimal>(type: "numeric(10,2)", precision: 10, scale: 2, nullable: false),
                    total_play_time = table.Column<int>(type: "integer", nullable: false),
                    current_rank = table.Column<int>(type: "integer", nullable: false),
                    highest_rank = table.Column<int>(type: "integer", nullable: false),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_user_statistics", x => x.Id);
                    table.ForeignKey(
                        name: "FK_user_statistics_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "games",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    room_id = table.Column<Guid>(type: "uuid", nullable: false),
                    game_mode = table.Column<string>(type: "text", nullable: false),
                    map_width = table.Column<int>(type: "integer", nullable: false),
                    map_height = table.Column<int>(type: "integer", nullable: false),
                    duration = table.Column<int>(type: "integer", nullable: false),
                    map_shape = table.Column<string>(type: "text", nullable: false),
                    powerup_spawn_interval = table.Column<int>(type: "integer", nullable: false),
                    max_powerups = table.Column<int>(type: "integer", nullable: false),
                    special_event_chance = table.Column<int>(type: "integer", nullable: false),
                    enable_dynamic_balance = table.Column<bool>(type: "boolean", nullable: false),
                    status = table.Column<int>(type: "integer", nullable: false),
                    winner_id = table.Column<Guid>(type: "uuid", nullable: true),
                    started_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    finished_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    game_data = table.Column<string>(type: "json", nullable: true),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_games", x => x.Id);
                    table.ForeignKey(
                        name: "FK_games_rooms_room_id",
                        column: x => x.room_id,
                        principalTable: "rooms",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_games_users_winner_id",
                        column: x => x.winner_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.SetNull);
                });

            migrationBuilder.CreateTable(
                name: "room_messages",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    room_id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    message = table.Column<string>(type: "text", nullable: false),
                    message_type = table.Column<int>(type: "integer", nullable: false),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_room_messages", x => x.Id);
                    table.ForeignKey(
                        name: "FK_room_messages_rooms_room_id",
                        column: x => x.room_id,
                        principalTable: "rooms",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_room_messages_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "room_players",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    room_id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    is_ready = table.Column<bool>(type: "boolean", nullable: false),
                    join_order = table.Column<int>(type: "integer", nullable: true),
                    player_color = table.Column<string>(type: "character varying(7)", maxLength: 7, nullable: true),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_room_players", x => x.Id);
                    table.ForeignKey(
                        name: "FK_room_players_rooms_room_id",
                        column: x => x.room_id,
                        principalTable: "rooms",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_room_players_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "game_actions",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    game_id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    action_type = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
                    action_data = table.Column<string>(type: "json", nullable: false),
                    timestamp = table.Column<long>(type: "bigint", nullable: false),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_game_actions", x => x.Id);
                    table.ForeignKey(
                        name: "FK_game_actions_games_game_id",
                        column: x => x.game_id,
                        principalTable: "games",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_game_actions_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "game_players",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uuid", nullable: false),
                    game_id = table.Column<Guid>(type: "uuid", nullable: false),
                    user_id = table.Column<Guid>(type: "uuid", nullable: false),
                    player_color = table.Column<string>(type: "character varying(7)", maxLength: 7, nullable: false),
                    final_area = table.Column<decimal>(type: "numeric(10,2)", precision: 10, scale: 2, nullable: false),
                    final_rank = table.Column<int>(type: "integer", nullable: true),
                    score_change = table.Column<int>(type: "integer", nullable: false),
                    actions_count = table.Column<int>(type: "integer", nullable: false),
                    play_time = table.Column<int>(type: "integer", nullable: false),
                    spawn_x = table.Column<float>(type: "real", nullable: false),
                    spawn_y = table.Column<float>(type: "real", nullable: false),
                    position_x = table.Column<float>(type: "real", nullable: false),
                    position_y = table.Column<float>(type: "real", nullable: false),
                    status = table.Column<int>(type: "integer", nullable: false),
                    death_count = table.Column<int>(type: "integer", nullable: false),
                    kill_count = table.Column<int>(type: "integer", nullable: false),
                    max_territory_area = table.Column<decimal>(type: "numeric(10,2)", precision: 10, scale: 2, nullable: false),
                    current_powerup = table.Column<string>(type: "text", nullable: true),
                    powerup_usage_count = table.Column<int>(type: "integer", nullable: false),
                    respawn_timestamp = table.Column<long>(type: "bigint", nullable: true),
                    team_id = table.Column<int>(type: "integer", nullable: true),
                    created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    updated_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
                    is_deleted = table.Column<bool>(type: "boolean", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_game_players", x => x.Id);
                    table.ForeignKey(
                        name: "FK_game_players_games_game_id",
                        column: x => x.game_id,
                        principalTable: "games",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_game_players_users_user_id",
                        column: x => x.user_id,
                        principalTable: "users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateIndex(
                name: "IX_GameActions_ActionType",
                table: "game_actions",
                column: "action_type");

            migrationBuilder.CreateIndex(
                name: "IX_GameActions_GameId",
                table: "game_actions",
                column: "game_id");

            migrationBuilder.CreateIndex(
                name: "IX_GameActions_GameId_Timestamp",
                table: "game_actions",
                columns: new[] { "game_id", "timestamp" });

            migrationBuilder.CreateIndex(
                name: "IX_GameActions_Timestamp",
                table: "game_actions",
                column: "timestamp");

            migrationBuilder.CreateIndex(
                name: "IX_GameActions_UserId",
                table: "game_actions",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "IX_game_players_user_id",
                table: "game_players",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "IX_GamePlayers_FinalArea",
                table: "game_players",
                column: "final_area");

            migrationBuilder.CreateIndex(
                name: "IX_GamePlayers_FinalRank",
                table: "game_players",
                column: "final_rank");

            migrationBuilder.CreateIndex(
                name: "IX_GamePlayers_GameId_UserId",
                table: "game_players",
                columns: new[] { "game_id", "user_id" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_GamePlayers_ScoreChange",
                table: "game_players",
                column: "score_change");

            migrationBuilder.CreateIndex(
                name: "IX_Games_FinishedAt",
                table: "games",
                column: "finished_at");

            migrationBuilder.CreateIndex(
                name: "IX_Games_RoomId",
                table: "games",
                column: "room_id");

            migrationBuilder.CreateIndex(
                name: "IX_Games_StartedAt",
                table: "games",
                column: "started_at");

            migrationBuilder.CreateIndex(
                name: "IX_Games_Status",
                table: "games",
                column: "status");

            migrationBuilder.CreateIndex(
                name: "IX_Games_WinnerId",
                table: "games",
                column: "winner_id");

            migrationBuilder.CreateIndex(
                name: "IX_Notifications_CreatedAt",
                table: "notifications",
                column: "created_at");

            migrationBuilder.CreateIndex(
                name: "IX_Notifications_Type",
                table: "notifications",
                column: "notification_type");

            migrationBuilder.CreateIndex(
                name: "IX_Notifications_UserId",
                table: "notifications",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "IX_Notifications_UserId_CreatedAt",
                table: "notifications",
                columns: new[] { "user_id", "created_at" });

            migrationBuilder.CreateIndex(
                name: "IX_Notifications_UserId_IsRead",
                table: "notifications",
                columns: new[] { "user_id", "is_read" });

            migrationBuilder.CreateIndex(
                name: "IX_RankingHistories_Type_RecordedAt",
                table: "ranking_histories",
                columns: new[] { "ranking_type", "recorded_at" });

            migrationBuilder.CreateIndex(
                name: "IX_RankingHistories_UserId",
                table: "ranking_histories",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "IX_RankingHistories_UserId_Type_RecordedAt",
                table: "ranking_histories",
                columns: new[] { "user_id", "ranking_type", "recorded_at" });

            migrationBuilder.CreateIndex(
                name: "IX_Rankings_Type_Rank",
                table: "rankings",
                columns: new[] { "ranking_type", "current_rank" });

            migrationBuilder.CreateIndex(
                name: "IX_Rankings_Type_Score",
                table: "rankings",
                columns: new[] { "ranking_type", "score" });

            migrationBuilder.CreateIndex(
                name: "IX_Rankings_UpdatedAt",
                table: "rankings",
                column: "updated_at");

            migrationBuilder.CreateIndex(
                name: "IX_Rankings_UserId_Type_Period",
                table: "rankings",
                columns: new[] { "user_id", "ranking_type", "period_start", "period_end" },
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_RoomMessages_CreatedAt",
                table: "room_messages",
                column: "created_at");

            migrationBuilder.CreateIndex(
                name: "IX_RoomMessages_RoomId",
                table: "room_messages",
                column: "room_id");

            migrationBuilder.CreateIndex(
                name: "IX_RoomMessages_RoomId_CreatedAt",
                table: "room_messages",
                columns: new[] { "room_id", "created_at" });

            migrationBuilder.CreateIndex(
                name: "IX_RoomMessages_UserId",
                table: "room_messages",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "IX_room_players_user_id",
                table: "room_players",
                column: "user_id");

            migrationBuilder.CreateIndex(
                name: "IX_RoomPlayers_JoinOrder",
                table: "room_players",
                column: "join_order");

            migrationBuilder.CreateIndex(
                name: "IX_RoomPlayers_RoomId_UserId",
                table: "room_players",
                columns: new[] { "room_id", "user_id" },
                unique: true,
                filter: "NOT is_deleted");

            migrationBuilder.CreateIndex(
                name: "IX_Rooms_CreatedAt",
                table: "rooms",
                column: "created_at");

            migrationBuilder.CreateIndex(
                name: "IX_Rooms_OwnerId",
                table: "rooms",
                column: "owner_id");

            migrationBuilder.CreateIndex(
                name: "IX_Rooms_Status",
                table: "rooms",
                column: "status");

            migrationBuilder.CreateIndex(
                name: "IX_Rooms_Status_IsPrivate",
                table: "rooms",
                columns: new[] { "status", "is_private" });

            migrationBuilder.CreateIndex(
                name: "IX_UserStatistics_CurrentRank",
                table: "user_statistics",
                column: "current_rank");

            migrationBuilder.CreateIndex(
                name: "IX_UserStatistics_TotalScore",
                table: "user_statistics",
                column: "total_score");

            migrationBuilder.CreateIndex(
                name: "IX_UserStatistics_UserId",
                table: "user_statistics",
                column: "user_id",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_UserStatistics_WinRate",
                table: "user_statistics",
                column: "win_rate");

            migrationBuilder.CreateIndex(
                name: "IX_Users_AccessToken",
                table: "users",
                column: "access_token",
                filter: "[access_token] IS NOT NULL");

            migrationBuilder.CreateIndex(
                name: "IX_Users_LastActivity",
                table: "users",
                column: "last_activity_at");

            migrationBuilder.CreateIndex(
                name: "IX_Users_RefreshToken",
                table: "users",
                column: "refresh_token",
                filter: "[refresh_token] IS NOT NULL");

            migrationBuilder.CreateIndex(
                name: "IX_Users_Status",
                table: "users",
                column: "status");

            migrationBuilder.CreateIndex(
                name: "IX_Users_TokenStatus_AccessTokenExpires",
                table: "users",
                columns: new[] { "token_status", "access_token_expires_at" });

            migrationBuilder.CreateIndex(
                name: "IX_Users_TokenStatus_RefreshTokenExpires",
                table: "users",
                columns: new[] { "token_status", "refresh_token_expires_at" });

            migrationBuilder.CreateIndex(
                name: "IX_Users_Username",
                table: "users",
                column: "username",
                unique: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "game_actions");

            migrationBuilder.DropTable(
                name: "game_players");

            migrationBuilder.DropTable(
                name: "notifications");

            migrationBuilder.DropTable(
                name: "ranking_histories");

            migrationBuilder.DropTable(
                name: "rankings");

            migrationBuilder.DropTable(
                name: "room_messages");

            migrationBuilder.DropTable(
                name: "room_players");

            migrationBuilder.DropTable(
                name: "user_statistics");

            migrationBuilder.DropTable(
                name: "games");

            migrationBuilder.DropTable(
                name: "rooms");

            migrationBuilder.DropTable(
                name: "users");
        }
    }
}
